.class public Lcom/zuiapps/library/util/UpgradeIOUtil;
.super Ljava/lang/Object;
.source "UpgradeIOUtil.java"


# static fields
.field public static final FS:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 40
    sget-object v0, Ljava/io/File;->separator:Ljava/lang/String;

    sput-object v0, Lcom/zuiapps/library/util/UpgradeIOUtil;->FS:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .prologue
    .line 38
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static addToSysGallery(Landroid/content/Context;Ljava/io/File;)Z
    .registers 12
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "file"    # Ljava/io/File;

    .prologue
    const/4 v5, 0x0

    .line 323
    if-nez p1, :cond_4

    .line 341
    :goto_3
    return v5

    .line 326
    :cond_4
    :try_start_4
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v6

    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v7

    const-string v8, ""

    const-string v9, ""

    invoke-static {v6, v7, v8, v9}, Landroid/provider/MediaStore$Images$Media;->insertImage(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 328
    .local v2, "pathMedia":Ljava/lang/String;
    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v6

    invoke-static {p0, v6}, Lcom/zuiapps/library/util/UpgradeIOUtil;->getFilePathByContentResolver(Landroid/content/Context;Landroid/net/Uri;)Ljava/lang/String;

    move-result-object v3

    .line 329
    .local v3, "realPath":Ljava/lang/String;
    new-instance v1, Landroid/content/Intent;

    const-string v6, "android.intent.action.MEDIA_SCANNER_SCAN_FILE"

    invoke-direct {v1, v6}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 330
    .local v1, "intent":Landroid/content/Intent;
    new-instance v6, Ljava/io/File;

    invoke-direct {v6, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v6}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v4

    .line 331
    .local v4, "uri":Landroid/net/Uri;
    invoke-virtual {v1, v4}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 332
    invoke-virtual {p0, v1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
    :try_end_32
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_32} :catch_34
    .catch Ljava/lang/OutOfMemoryError; {:try_start_4 .. :try_end_32} :catch_39
    .catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_32} :catch_3e

    .line 333
    const/4 v5, 0x1

    goto :goto_3

    .line 334
    .end local v1    # "intent":Landroid/content/Intent;
    .end local v2    # "pathMedia":Ljava/lang/String;
    .end local v3    # "realPath":Ljava/lang/String;
    .end local v4    # "uri":Landroid/net/Uri;
    :catch_34
    move-exception v0

    .line 335
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_3

    .line 336
    .end local v0    # "e":Ljava/lang/Exception;
    :catch_39
    move-exception v0

    .line 337
    .local v0, "e":Ljava/lang/OutOfMemoryError;
    invoke-virtual {v0}, Ljava/lang/OutOfMemoryError;->printStackTrace()V

    goto :goto_3

    .line 338
    .end local v0    # "e":Ljava/lang/OutOfMemoryError;
    :catch_3e
    move-exception v0

    .line 339
    .local v0, "e":Ljava/lang/Throwable;
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_3
.end method

.method private static closeStream(Ljava/io/Closeable;)V
    .registers 2
    .param p0, "stream"    # Ljava/io/Closeable;

    .prologue
    .line 142
    if-eqz p0, :cond_5

    .line 144
    :try_start_2
    invoke-interface {p0}, Ljava/io/Closeable;->close()V
    :try_end_5
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_5} :catch_6

    .line 148
    :cond_5
    :goto_5
    return-void

    .line 145
    :catch_6
    move-exception v0

    goto :goto_5
.end method

.method public static convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;
    .registers 7
    .param p0, "is"    # Ljava/io/InputStream;

    .prologue
    .line 77
    new-instance v2, Ljava/io/BufferedReader;

    new-instance v4, Ljava/io/InputStreamReader;

    invoke-direct {v4, p0}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    const/16 v5, 0x2000

    invoke-direct {v2, v4, v5}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V

    .line 78
    .local v2, "reader":Ljava/io/BufferedReader;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    .line 80
    .local v3, "sb":Ljava/lang/StringBuilder;
    const/4 v1, 0x0

    .line 82
    .local v1, "line":Ljava/lang/String;
    :goto_12
    :try_start_12
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_3f

    .line 83
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "\n"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_2e
    .catch Ljava/io/IOException; {:try_start_12 .. :try_end_2e} :catch_2f
    .catchall {:try_start_12 .. :try_end_2e} :catchall_45

    goto :goto_12

    .line 85
    :catch_2f
    move-exception v0

    .line 86
    .local v0, "e":Ljava/io/IOException;
    :try_start_30
    const-string v4, "convertStreamToString"

    const-string v5, "convertStreamToString error"

    invoke-static {v4, v5}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_37
    .catchall {:try_start_30 .. :try_end_37} :catchall_45

    .line 89
    :try_start_37
    invoke-virtual {p0}, Ljava/io/InputStream;->close()V
    :try_end_3a
    .catch Ljava/io/IOException; {:try_start_37 .. :try_end_3a} :catch_4a

    .line 94
    .end local v0    # "e":Ljava/io/IOException;
    :goto_3a
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    return-object v4

    .line 89
    :cond_3f
    :try_start_3f
    invoke-virtual {p0}, Ljava/io/InputStream;->close()V
    :try_end_42
    .catch Ljava/io/IOException; {:try_start_3f .. :try_end_42} :catch_43

    goto :goto_3a

    .line 90
    :catch_43
    move-exception v4

    goto :goto_3a

    .line 88
    :catchall_45
    move-exception v4

    .line 89
    :try_start_46
    invoke-virtual {p0}, Ljava/io/InputStream;->close()V
    :try_end_49
    .catch Ljava/io/IOException; {:try_start_46 .. :try_end_49} :catch_4c

    .line 91
    :goto_49
    throw v4

    .line 90
    .restart local v0    # "e":Ljava/io/IOException;
    :catch_4a
    move-exception v4

    goto :goto_3a

    .end local v0    # "e":Ljava/io/IOException;
    :catch_4c
    move-exception v5

    goto :goto_49
.end method

.method private static copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V
    .registers 5
    .param p0, "in"    # Ljava/io/InputStream;
    .param p1, "out"    # Ljava/io/OutputStream;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 134
    const/16 v2, 0x1000

    new-array v0, v2, [B

    .line 136
    .local v0, "b":[B
    :goto_4
    invoke-virtual {p0, v0}, Ljava/io/InputStream;->read([B)I

    move-result v1

    .local v1, "read":I
    const/4 v2, -0x1

    if-eq v1, v2, :cond_10

    .line 137
    const/4 v2, 0x0

    invoke-virtual {p1, v0, v2, v1}, Ljava/io/OutputStream;->write([BII)V

    goto :goto_4

    .line 139
    :cond_10
    return-void
.end method

.method public static copyAssetsFile(Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)V
    .registers 9
    .param p0, "outFilePath"    # Ljava/lang/String;
    .param p1, "assetFile"    # Ljava/lang/String;
    .param p2, "context"    # Landroid/content/Context;

    .prologue
    .line 388
    :try_start_0
    new-instance v4, Ljava/io/FileOutputStream;

    invoke-direct {v4, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V

    .line 389
    .local v4, "myOutput":Ljava/io/OutputStream;
    invoke-virtual {p2}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;

    move-result-object v5

    invoke-virtual {v5, p1}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object v3

    .line 390
    .local v3, "myInput":Ljava/io/InputStream;
    const/16 v5, 0x400

    new-array v0, v5, [B

    .line 392
    .local v0, "buffer":[B
    :goto_11
    invoke-virtual {v3, v0}, Ljava/io/InputStream;->read([B)I

    move-result v2

    .local v2, "length":I
    if-lez v2, :cond_21

    .line 393
    const/4 v5, 0x0

    invoke-virtual {v4, v0, v5, v2}, Ljava/io/OutputStream;->write([BII)V
    :try_end_1b
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_1b} :catch_1c
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_1b} :catch_2b

    goto :goto_11

    .line 398
    .end local v0    # "buffer":[B
    .end local v2    # "length":I
    .end local v3    # "myInput":Ljava/io/InputStream;
    .end local v4    # "myOutput":Ljava/io/OutputStream;
    :catch_1c
    move-exception v1

    .line 399
    .local v1, "e":Ljava/io/FileNotFoundException;
    invoke-virtual {v1}, Ljava/io/FileNotFoundException;->printStackTrace()V

    .line 404
    .end local v1    # "e":Ljava/io/FileNotFoundException;
    :goto_20
    return-void

    .line 395
    .restart local v0    # "buffer":[B
    .restart local v2    # "length":I
    .restart local v3    # "myInput":Ljava/io/InputStream;
    .restart local v4    # "myOutput":Ljava/io/OutputStream;
    :cond_21
    :try_start_21
    invoke-virtual {v4}, Ljava/io/OutputStream;->flush()V

    .line 396
    invoke-virtual {v3}, Ljava/io/InputStream;->close()V

    .line 397
    invoke-virtual {v4}, Ljava/io/OutputStream;->close()V
    :try_end_2a
    .catch Ljava/io/FileNotFoundException; {:try_start_21 .. :try_end_2a} :catch_1c
    .catch Ljava/io/IOException; {:try_start_21 .. :try_end_2a} :catch_2b

    goto :goto_20

    .line 400
    .end local v0    # "buffer":[B
    .end local v2    # "length":I
    .end local v3    # "myInput":Ljava/io/InputStream;
    .end local v4    # "myOutput":Ljava/io/OutputStream;
    :catch_2b
    move-exception v1

    .line 401
    .local v1, "e":Ljava/io/IOException;
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_20
.end method

.method public static deleteFolder(Ljava/io/File;Z)V
    .registers 9
    .param p0, "folder"    # Ljava/io/File;
    .param p1, "iDeleteFolder"    # Z

    .prologue
    .line 365
    invoke-virtual {p0}, Ljava/io/File;->list()[Ljava/lang/String;

    move-result-object v2

    .line 366
    .local v2, "childs":[Ljava/lang/String;
    if-eqz v2, :cond_9

    array-length v5, v2

    if-gtz v5, :cond_c

    .line 367
    :cond_9
    invoke-virtual {p0}, Ljava/io/File;->delete()Z

    .line 369
    :cond_c
    const/4 v4, 0x0

    .local v4, "i":I
    :goto_d
    array-length v5, v2

    if-ge v4, v5, :cond_54

    .line 370
    aget-object v0, v2, v4

    .line 371
    .local v0, "childName":Ljava/lang/String;
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 372
    .local v1, "childPath":Ljava/lang/String;
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 373
    .local v3, "filePath":Ljava/io/File;
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v5

    if-eqz v5, :cond_44

    invoke-virtual {v3}, Ljava/io/File;->isFile()Z

    move-result v5

    if-eqz v5, :cond_44

    .line 374
    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    .line 369
    :cond_41
    :goto_41
    add-int/lit8 v4, v4, 0x1

    goto :goto_d

    .line 375
    :cond_44
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v5

    if-eqz v5, :cond_41

    invoke-virtual {v3}, Ljava/io/File;->isDirectory()Z

    move-result v5

    if-eqz v5, :cond_41

    .line 376
    invoke-static {v3, p1}, Lcom/zuiapps/library/util/UpgradeIOUtil;->deleteFolder(Ljava/io/File;Z)V

    goto :goto_41

    .line 379
    .end local v0    # "childName":Ljava/lang/String;
    .end local v1    # "childPath":Ljava/lang/String;
    .end local v3    # "filePath":Ljava/io/File;
    :cond_54
    if-eqz p1, :cond_59

    .line 380
    invoke-virtual {p0}, Ljava/io/File;->delete()Z

    .line 382
    :cond_59
    return-void
.end method

.method public static getBaseLocalLocation(Landroid/content/Context;)Ljava/lang/String;
    .registers 4
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 288
    invoke-static {}, Lcom/zuiapps/library/util/UpgradeIOUtil;->getExternalStorageState()Z

    move-result v1

    .line 289
    .local v1, "isSDCanRead":Z
    const-string v0, ""

    .line 290
    .local v0, "baseLocation":Ljava/lang/String;
    if-eqz v1, :cond_d

    .line 291
    invoke-static {}, Lcom/zuiapps/library/util/UpgradeIOUtil;->getSDCardPath()Ljava/lang/String;

    move-result-object v0

    .line 295
    :goto_c
    return-object v0

    .line 293
    :cond_d
    invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v2

    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    goto :goto_c
.end method

.method public static getBitmapFromUrl(Ljava/net/URL;)Landroid/graphics/Bitmap;
    .registers 11
    .param p0, "url"    # Ljava/net/URL;

    .prologue
    .line 98
    const/4 v0, 0x0

    .line 99
    .local v0, "bitmap":Landroid/graphics/Bitmap;
    const/4 v4, 0x0

    .line 100
    .local v4, "in":Ljava/io/InputStream;
    const/4 v6, 0x0

    .line 103
    .local v6, "out":Ljava/io/OutputStream;
    :try_start_3
    new-instance v5, Ljava/io/BufferedInputStream;

    invoke-virtual {p0}, Ljava/net/URL;->openStream()Ljava/io/InputStream;

    move-result-object v8

    const/16 v9, 0x1000

    invoke-direct {v5, v8, v9}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;I)V
    :try_end_e
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_e} :catch_39
    .catchall {:try_start_3 .. :try_end_e} :catchall_42

    .line 105
    .end local v4    # "in":Ljava/io/InputStream;
    .local v5, "in":Ljava/io/InputStream;
    :try_start_e
    new-instance v3, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v3}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 106
    .local v3, "dataStream":Ljava/io/ByteArrayOutputStream;
    new-instance v7, Ljava/io/BufferedOutputStream;

    const/16 v8, 0x1000

    invoke-direct {v7, v3, v8}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;I)V
    :try_end_1a
    .catch Ljava/io/IOException; {:try_start_e .. :try_end_1a} :catch_51
    .catchall {:try_start_e .. :try_end_1a} :catchall_4a

    .line 107
    .end local v6    # "out":Ljava/io/OutputStream;
    .local v7, "out":Ljava/io/OutputStream;
    :try_start_1a
    invoke-static {v5, v7}, Lcom/zuiapps/library/util/UpgradeIOUtil;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V

    .line 108
    invoke-virtual {v7}, Ljava/io/OutputStream;->flush()V

    .line 110
    invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v2

    .line 111
    .local v2, "data":[B
    new-instance v1, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v1}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 112
    .local v1, "bitmapOptions":Landroid/graphics/BitmapFactory$Options;
    const/4 v8, 0x0

    array-length v9, v2

    invoke-static {v2, v8, v9, v1}, Landroid/graphics/BitmapFactory;->decodeByteArray([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_2e
    .catch Ljava/io/IOException; {:try_start_1a .. :try_end_2e} :catch_54
    .catchall {:try_start_1a .. :try_end_2e} :catchall_4d

    move-result-object v0

    .line 116
    invoke-static {v5}, Lcom/zuiapps/library/util/UpgradeIOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 117
    invoke-static {v7}, Lcom/zuiapps/library/util/UpgradeIOUtil;->closeStream(Ljava/io/Closeable;)V

    move-object v6, v7

    .end local v7    # "out":Ljava/io/OutputStream;
    .restart local v6    # "out":Ljava/io/OutputStream;
    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    move-object v8, v0

    .line 119
    .end local v1    # "bitmapOptions":Landroid/graphics/BitmapFactory$Options;
    .end local v2    # "data":[B
    .end local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    :goto_38
    return-object v8

    .line 114
    :catch_39
    move-exception v8

    .line 116
    :goto_3a
    invoke-static {v4}, Lcom/zuiapps/library/util/UpgradeIOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 117
    invoke-static {v6}, Lcom/zuiapps/library/util/UpgradeIOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 119
    const/4 v8, 0x0

    goto :goto_38

    .line 116
    :catchall_42
    move-exception v8

    :goto_43
    invoke-static {v4}, Lcom/zuiapps/library/util/UpgradeIOUtil;->closeStream(Ljava/io/Closeable;)V

    .line 117
    invoke-static {v6}, Lcom/zuiapps/library/util/UpgradeIOUtil;->closeStream(Ljava/io/Closeable;)V

    throw v8

    .line 116
    .end local v4    # "in":Ljava/io/InputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    :catchall_4a
    move-exception v8

    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_43

    .end local v4    # "in":Ljava/io/InputStream;
    .end local v6    # "out":Ljava/io/OutputStream;
    .restart local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    .restart local v7    # "out":Ljava/io/OutputStream;
    :catchall_4d
    move-exception v8

    move-object v6, v7

    .end local v7    # "out":Ljava/io/OutputStream;
    .restart local v6    # "out":Ljava/io/OutputStream;
    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_43

    .line 114
    .end local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    .end local v4    # "in":Ljava/io/InputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    :catch_51
    move-exception v8

    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_3a

    .end local v4    # "in":Ljava/io/InputStream;
    .end local v6    # "out":Ljava/io/OutputStream;
    .restart local v3    # "dataStream":Ljava/io/ByteArrayOutputStream;
    .restart local v5    # "in":Ljava/io/InputStream;
    .restart local v7    # "out":Ljava/io/OutputStream;
    :catch_54
    move-exception v8

    move-object v6, v7

    .end local v7    # "out":Ljava/io/OutputStream;
    .restart local v6    # "out":Ljava/io/OutputStream;
    move-object v4, v5

    .end local v5    # "in":Ljava/io/InputStream;
    .restart local v4    # "in":Ljava/io/InputStream;
    goto :goto_3a
.end method

.method public static getDrawableFromUrl(Ljava/net/URL;)Landroid/graphics/drawable/Drawable;
    .registers 4
    .param p0, "url"    # Ljava/net/URL;

    .prologue
    .line 124
    :try_start_0
    invoke-virtual {p0}, Ljava/net/URL;->openStream()Ljava/io/InputStream;

    move-result-object v1

    .line 125
    .local v1, "is":Ljava/io/InputStream;
    const-string v2, "src"

    invoke-static {v1, v2}, Landroid/graphics/drawable/Drawable;->createFromStream(Ljava/io/InputStream;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;
    :try_end_9
    .catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_9} :catch_e
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_9} :catch_b

    move-result-object v0

    .line 130
    .end local v1    # "is":Ljava/io/InputStream;
    :goto_a
    return-object v0

    .line 128
    :catch_b
    move-exception v2

    .line 130
    :goto_c
    const/4 v0, 0x0

    goto :goto_a

    .line 127
    :catch_e
    move-exception v2

    goto :goto_c
.end method

.method public static getExtentionName(Ljava/lang/String;)Ljava/lang/String;
    .registers 3
    .param p0, "url"    # Ljava/lang/String;

    .prologue
    .line 278
    if-eqz p0, :cond_20

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    if-lez v1, :cond_20

    .line 279
    const/16 v1, 0x2e

    invoke-virtual {p0, v1}, Ljava/lang/String;->lastIndexOf(I)I

    move-result v0

    .line 280
    .local v0, "dot":I
    const/4 v1, -0x1

    if-le v0, v1, :cond_20

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    if-ge v0, v1, :cond_20

    .line 281
    add-int/lit8 v1, v0, 0x1

    invoke-virtual {p0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v1

    .line 284
    .end local v0    # "dot":I
    :goto_1f
    return-object v1

    :cond_20
    const/4 v1, 0x0

    goto :goto_1f
.end method

.method public static getExternalStorageState()Z
    .registers 3

    .prologue
    const/4 v1, 0x0

    .line 240
    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v0

    .line 241
    .local v0, "state":Ljava/lang/String;
    const-string v2, "mounted"

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_f

    .line 242
    const/4 v1, 0x1

    .line 246
    :cond_e
    :goto_e
    return v1

    .line 243
    :cond_f
    const-string v2, "mounted_ro"

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_e

    goto :goto_e
.end method

.method private static getFilePathByContentResolver(Landroid/content/Context;Landroid/net/Uri;)Ljava/lang/String;
    .registers 10
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "uri"    # Landroid/net/Uri;

    .prologue
    const/4 v2, 0x0

    .line 345
    if-nez p1, :cond_4

    .line 361
    :goto_3
    return-object v2

    .line 348
    :cond_4
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    move-object v1, p1

    move-object v3, v2

    move-object v4, v2

    move-object v5, v2

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 349
    .local v6, "c":Landroid/database/Cursor;
    const/4 v7, 0x0

    .line 350
    .local v7, "filePath":Ljava/lang/String;
    if-nez v6, :cond_32

    .line 351
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Query on "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " returns null result."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 354
    :cond_32
    :try_start_32
    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_3f

    invoke-interface {v6}, Landroid/database/Cursor;->moveToFirst()Z
    :try_end_3c
    .catchall {:try_start_32 .. :try_end_3c} :catchall_4f

    move-result v0

    if-nez v0, :cond_44

    .line 359
    :cond_3f
    :goto_3f
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    move-object v2, v7

    .line 361
    goto :goto_3

    .line 356
    :cond_44
    :try_start_44
    const-string v0, "_data"

    invoke-interface {v6, v0}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    invoke-interface {v6, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
    :try_end_4d
    .catchall {:try_start_44 .. :try_end_4d} :catchall_4f

    move-result-object v7

    goto :goto_3f

    .line 359
    :catchall_4f
    move-exception v0

    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    throw v0
.end method

.method public static getFileSize(Ljava/io/File;)I
    .registers 6
    .param p0, "file"    # Ljava/io/File;

    .prologue
    .line 299
    if-nez p0, :cond_4

    .line 300
    const/4 v3, 0x0

    .line 318
    :goto_3
    return v3

    .line 302
    :cond_4
    const/4 v1, 0x0

    .line 303
    .local v1, "fis":Ljava/io/FileInputStream;
    const/4 v3, 0x0

    .line 305
    .local v3, "size":I
    :try_start_6
    new-instance v2, Ljava/io/FileInputStream;

    invoke-direct {v2, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_b
    .catch Ljava/io/FileNotFoundException; {:try_start_6 .. :try_end_b} :catch_1a
    .catch Ljava/lang/Throwable; {:try_start_6 .. :try_end_b} :catch_27
    .catchall {:try_start_6 .. :try_end_b} :catchall_34

    .line 306
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .local v2, "fis":Ljava/io/FileInputStream;
    :try_start_b
    invoke-virtual {v2}, Ljava/io/FileInputStream;->available()I
    :try_end_e
    .catch Ljava/io/FileNotFoundException; {:try_start_b .. :try_end_e} :catch_44
    .catch Ljava/lang/Throwable; {:try_start_b .. :try_end_e} :catch_41
    .catchall {:try_start_b .. :try_end_e} :catchall_3e

    move-result v3

    .line 313
    :try_start_f
    invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
    :try_end_12
    .catch Ljava/io/IOException; {:try_start_f .. :try_end_12} :catch_14

    move-object v1, v2

    .line 316
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_3

    .line 314
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catch_14
    move-exception v0

    .line 315
    .local v0, "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    move-object v1, v2

    .line 317
    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_3

    .line 307
    .end local v0    # "e":Ljava/io/IOException;
    :catch_1a
    move-exception v0

    .line 308
    .local v0, "e":Ljava/io/FileNotFoundException;
    :goto_1b
    :try_start_1b
    invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V
    :try_end_1e
    .catchall {:try_start_1b .. :try_end_1e} :catchall_34

    .line 313
    :try_start_1e
    invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
    :try_end_21
    .catch Ljava/io/IOException; {:try_start_1e .. :try_end_21} :catch_22

    goto :goto_3

    .line 314
    :catch_22
    move-exception v0

    .line 315
    .local v0, "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_3

    .line 309
    .end local v0    # "e":Ljava/io/IOException;
    :catch_27
    move-exception v0

    .line 310
    .local v0, "e":Ljava/lang/Throwable;
    :goto_28
    :try_start_28
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
    :try_end_2b
    .catchall {:try_start_28 .. :try_end_2b} :catchall_34

    .line 313
    :try_start_2b
    invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
    :try_end_2e
    .catch Ljava/io/IOException; {:try_start_2b .. :try_end_2e} :catch_2f

    goto :goto_3

    .line 314
    :catch_2f
    move-exception v0

    .line 315
    .local v0, "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_3

    .line 312
    .end local v0    # "e":Ljava/io/IOException;
    :catchall_34
    move-exception v4

    .line 313
    :goto_35
    :try_start_35
    invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V
    :try_end_38
    .catch Ljava/io/IOException; {:try_start_35 .. :try_end_38} :catch_39

    .line 316
    :goto_38
    throw v4

    .line 314
    :catch_39
    move-exception v0

    .line 315
    .restart local v0    # "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_38

    .line 312
    .end local v0    # "e":Ljava/io/IOException;
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catchall_3e
    move-exception v4

    move-object v1, v2

    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_35

    .line 309
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catch_41
    move-exception v0

    move-object v1, v2

    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_28

    .line 307
    .end local v1    # "fis":Ljava/io/FileInputStream;
    .restart local v2    # "fis":Ljava/io/FileInputStream;
    :catch_44
    move-exception v0

    move-object v1, v2

    .end local v2    # "fis":Ljava/io/FileInputStream;
    .restart local v1    # "fis":Ljava/io/FileInputStream;
    goto :goto_1b
.end method

.method public static getPathName(Ljava/lang/String;)Ljava/lang/String;
    .registers 2
    .param p0, "url"    # Ljava/lang/String;

    .prologue
    .line 274
    const-string v0, "/"

    invoke-virtual {p0, v0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getSDCardPath()Ljava/lang/String;
    .registers 1

    .prologue
    .line 251
    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getUrlResponse(Ljava/lang/String;)Ljava/lang/String;
    .registers 6
    .param p0, "url"    # Ljava/lang/String;

    .prologue
    .line 44
    :try_start_0
    new-instance v2, Lorg/apache/http/client/methods/HttpGet;

    invoke-direct {v2, p0}, Lorg/apache/http/client/methods/HttpGet;-><init>(Ljava/lang/String;)V

    .line 45
    .local v2, "get":Lorg/apache/http/client/methods/HttpGet;
    new-instance v0, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v0}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 46
    .local v0, "client":Lorg/apache/http/client/HttpClient;
    invoke-interface {v0, v2}, Lorg/apache/http/client/HttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v3

    .line 47
    .local v3, "response":Lorg/apache/http/HttpResponse;
    invoke-interface {v3}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v1

    .line 48
    .local v1, "entity":Lorg/apache/http/HttpEntity;
    invoke-interface {v1}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/library/util/UpgradeIOUtil;->convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;
    :try_end_19
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_19} :catch_1b

    move-result-object v4

    .line 51
    .end local v0    # "client":Lorg/apache/http/client/HttpClient;
    .end local v1    # "entity":Lorg/apache/http/HttpEntity;
    .end local v2    # "get":Lorg/apache/http/client/methods/HttpGet;
    .end local v3    # "response":Lorg/apache/http/HttpResponse;
    :goto_1a
    return-object v4

    .line 49
    :catch_1b
    move-exception v4

    .line 51
    const/4 v4, 0x0

    goto :goto_1a
.end method

.method public static isDirExist(Ljava/lang/String;)Z
    .registers 3
    .param p0, "path"    # Ljava/lang/String;

    .prologue
    .line 264
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 265
    .local v0, "file":Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_13

    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v1

    if-eqz v1, :cond_13

    const/4 v1, 0x1

    :goto_12
    return v1

    :cond_13
    const/4 v1, 0x0

    goto :goto_12
.end method

.method public static isFileExist(Ljava/lang/String;)Z
    .registers 5
    .param p0, "path"    # Ljava/lang/String;

    .prologue
    const/4 v2, 0x0

    .line 256
    :try_start_1
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 257
    .local v0, "file":Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_13

    invoke-virtual {v0}, Ljava/io/File;->isFile()Z
    :try_end_f
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_f} :catch_14

    move-result v3

    if-eqz v3, :cond_13

    const/4 v2, 0x1

    .line 259
    .end local v0    # "file":Ljava/io/File;
    :cond_13
    :goto_13
    return v2

    .line 258
    :catch_14
    move-exception v1

    .line 259
    .local v1, "t":Ljava/lang/Throwable;
    goto :goto_13
.end method

.method public static makeDirs(Ljava/lang/String;)Z
    .registers 3
    .param p0, "path"    # Ljava/lang/String;

    .prologue
    .line 269
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 270
    .local v0, "file":Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z

    move-result v1

    return v1
.end method

.method public static saveFile([BLjava/lang/String;Ljava/lang/String;)Z
    .registers 11
    .param p0, "fileStream"    # [B
    .param p1, "relativePath"    # Ljava/lang/String;
    .param p2, "basePath"    # Ljava/lang/String;

    .prologue
    .line 151
    const/4 v0, 0x0

    .line 152
    .local v0, "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    const/4 v3, 0x0

    .line 154
    .local v3, "fileOutputStream":Ljava/io/FileOutputStream;
    :try_start_2
    new-instance v1, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v1}, Ljava/io/ByteArrayOutputStream;-><init>()V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_7} :catch_4e
    .catchall {:try_start_2 .. :try_end_7} :catchall_65

    .line 155
    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .local v1, "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    const/4 v5, 0x0

    .local v5, "i":I
    :goto_8
    :try_start_8
    array-length v6, p0

    if-ge v5, v6, :cond_13

    .line 156
    aget-byte v6, p0, v5

    invoke-virtual {v1, v6}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 155
    add-int/lit8 v5, v5, 0x1

    goto :goto_8

    .line 158
    :cond_13
    new-instance v4, Ljava/io/FileOutputStream;

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v6, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    sget-object v7, Lcom/zuiapps/library/util/UpgradeIOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-direct {v4, v6}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V
    :try_end_2f
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_2f} :catch_82
    .catchall {:try_start_8 .. :try_end_2f} :catchall_7b

    .line 159
    .end local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    .local v4, "fileOutputStream":Ljava/io/FileOutputStream;
    :try_start_2f
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v6

    invoke-virtual {v4, v6}, Ljava/io/FileOutputStream;->write([B)V
    :try_end_36
    .catch Ljava/lang/Exception; {:try_start_2f .. :try_end_36} :catch_85
    .catchall {:try_start_2f .. :try_end_36} :catchall_7e

    .line 160
    const/4 v6, 0x1

    .line 165
    if-eqz v1, :cond_3c

    .line 166
    :try_start_39
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_3c
    .catch Ljava/io/IOException; {:try_start_39 .. :try_end_3c} :catch_44

    .line 172
    :cond_3c
    :goto_3c
    if-eqz v4, :cond_41

    .line 173
    :try_start_3e
    invoke-virtual {v4}, Ljava/io/FileOutputStream;->close()V
    :try_end_41
    .catch Ljava/io/IOException; {:try_start_3e .. :try_end_41} :catch_49

    :cond_41
    :goto_41
    move-object v3, v4

    .end local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    move-object v0, v1

    .line 177
    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v5    # "i":I
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    :cond_43
    :goto_43
    return v6

    .line 168
    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v5    # "i":I
    :catch_44
    move-exception v2

    .line 169
    .local v2, "e":Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_3c

    .line 175
    .end local v2    # "e":Ljava/io/IOException;
    :catch_49
    move-exception v2

    .line 176
    .restart local v2    # "e":Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_41

    .line 161
    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v2    # "e":Ljava/io/IOException;
    .end local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .end local v5    # "i":I
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    :catch_4e
    move-exception v2

    .line 162
    .local v2, "e":Ljava/lang/Exception;
    :goto_4f
    const/4 v6, 0x0

    .line 165
    if-eqz v0, :cond_55

    .line 166
    :try_start_52
    invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_55
    .catch Ljava/io/IOException; {:try_start_52 .. :try_end_55} :catch_60

    .line 172
    .end local v2    # "e":Ljava/lang/Exception;
    :cond_55
    :goto_55
    if-eqz v3, :cond_43

    .line 173
    :try_start_57
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V
    :try_end_5a
    .catch Ljava/io/IOException; {:try_start_57 .. :try_end_5a} :catch_5b

    goto :goto_43

    .line 175
    :catch_5b
    move-exception v2

    .line 176
    .local v2, "e":Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_43

    .line 168
    .local v2, "e":Ljava/lang/Exception;
    :catch_60
    move-exception v2

    .line 169
    .local v2, "e":Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_55

    .line 164
    .end local v2    # "e":Ljava/io/IOException;
    :catchall_65
    move-exception v6

    .line 165
    :goto_66
    if-eqz v0, :cond_6b

    .line 166
    :try_start_68
    invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_6b
    .catch Ljava/io/IOException; {:try_start_68 .. :try_end_6b} :catch_71

    .line 172
    :cond_6b
    :goto_6b
    if-eqz v3, :cond_70

    .line 173
    :try_start_6d
    invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V
    :try_end_70
    .catch Ljava/io/IOException; {:try_start_6d .. :try_end_70} :catch_76

    .line 177
    :cond_70
    :goto_70
    throw v6

    .line 168
    :catch_71
    move-exception v2

    .line 169
    .restart local v2    # "e":Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_6b

    .line 175
    .end local v2    # "e":Ljava/io/IOException;
    :catch_76
    move-exception v2

    .line 176
    .restart local v2    # "e":Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_70

    .line 164
    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v2    # "e":Ljava/io/IOException;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v5    # "i":I
    :catchall_7b
    move-exception v6

    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_66

    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    :catchall_7e
    move-exception v6

    move-object v3, v4

    .end local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_66

    .line 161
    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    :catch_82
    move-exception v2

    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_4f

    .end local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .end local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    :catch_85
    move-exception v2

    move-object v3, v4

    .end local v4    # "fileOutputStream":Ljava/io/FileOutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/FileOutputStream;
    move-object v0, v1

    .end local v1    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    .restart local v0    # "byteOutputStream":Ljava/io/ByteArrayOutputStream;
    goto :goto_4f
.end method

.method public static saveImageFile(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;Ljava/lang/String;Ljava/lang/String;)Z
    .registers 11
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;
    .param p1, "compressFormat"    # Landroid/graphics/Bitmap$CompressFormat;
    .param p2, "relativePath"    # Ljava/lang/String;
    .param p3, "basePath"    # Ljava/lang/String;

    .prologue
    const/4 v4, 0x0

    .line 182
    if-nez p0, :cond_4

    .line 206
    :goto_3
    return v4

    .line 184
    :cond_4
    const/4 v2, 0x0

    .line 185
    .local v2, "fileOutputStream":Ljava/io/OutputStream;
    new-instance v1, Ljava/io/File;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Lcom/zuiapps/library/util/UpgradeIOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 186
    .local v1, "file":Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_32

    .line 187
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->mkdirs()Z

    .line 190
    :cond_32
    :try_start_32
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_37
    .catch Ljava/lang/Exception; {:try_start_32 .. :try_end_37} :catch_45
    .catch Ljava/lang/Throwable; {:try_start_32 .. :try_end_37} :catch_48
    .catchall {:try_start_32 .. :try_end_37} :catchall_4b

    .line 192
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .local v3, "fileOutputStream":Ljava/io/OutputStream;
    const/16 v5, 0x64

    :try_start_39
    invoke-virtual {p0, p1, v5, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 193
    invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V

    .line 194
    invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
    :try_end_42
    .catch Ljava/lang/Exception; {:try_start_39 .. :try_end_42} :catch_54
    .catch Ljava/lang/Throwable; {:try_start_39 .. :try_end_42} :catch_51
    .catchall {:try_start_39 .. :try_end_42} :catchall_4e

    .line 204
    const/4 v2, 0x0

    .line 206
    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    const/4 v4, 0x1

    goto :goto_3

    .line 199
    :catch_45
    move-exception v0

    .line 204
    .local v0, "e":Ljava/lang/Exception;
    :goto_46
    const/4 v2, 0x0

    goto :goto_3

    .line 201
    .end local v0    # "e":Ljava/lang/Exception;
    :catch_48
    move-exception v0

    .line 204
    .local v0, "e":Ljava/lang/Throwable;
    :goto_49
    const/4 v2, 0x0

    goto :goto_3

    .end local v0    # "e":Ljava/lang/Throwable;
    :catchall_4b
    move-exception v4

    :goto_4c
    const/4 v2, 0x0

    throw v4

    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catchall_4e
    move-exception v4

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_4c

    .line 201
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_51
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_49

    .line 199
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_54
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_46
.end method

.method public static saveImageFile(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;Ljava/lang/String;Ljava/lang/String;I)Z
    .registers 12
    .param p0, "bitmap"    # Landroid/graphics/Bitmap;
    .param p1, "compressFormat"    # Landroid/graphics/Bitmap$CompressFormat;
    .param p2, "relativePath"    # Ljava/lang/String;
    .param p3, "basePath"    # Ljava/lang/String;
    .param p4, "quality"    # I

    .prologue
    const/4 v4, 0x0

    .line 210
    if-nez p0, :cond_4

    .line 236
    :goto_3
    return v4

    .line 213
    :cond_4
    const/4 v2, 0x0

    .line 215
    .local v2, "fileOutputStream":Ljava/io/OutputStream;
    :try_start_5
    new-instance v1, Ljava/io/File;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    sget-object v6, Lcom/zuiapps/library/util/UpgradeIOUtil;->FS:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 216
    .local v1, "file":Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_32

    .line 217
    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v5}, Ljava/io/File;->mkdirs()Z

    .line 220
    :cond_32
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_37
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_37} :catch_43
    .catch Ljava/lang/Throwable; {:try_start_5 .. :try_end_37} :catch_46
    .catchall {:try_start_5 .. :try_end_37} :catchall_49

    .line 222
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .local v3, "fileOutputStream":Ljava/io/OutputStream;
    :try_start_37
    invoke-virtual {p0, p1, p4, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 223
    invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V

    .line 224
    invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
    :try_end_40
    .catch Ljava/lang/Exception; {:try_start_37 .. :try_end_40} :catch_52
    .catch Ljava/lang/Throwable; {:try_start_37 .. :try_end_40} :catch_4f
    .catchall {:try_start_37 .. :try_end_40} :catchall_4c

    .line 234
    const/4 v2, 0x0

    .line 236
    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    const/4 v4, 0x1

    goto :goto_3

    .line 229
    .end local v1    # "file":Ljava/io/File;
    :catch_43
    move-exception v0

    .line 234
    .local v0, "e":Ljava/lang/Exception;
    :goto_44
    const/4 v2, 0x0

    goto :goto_3

    .line 231
    .end local v0    # "e":Ljava/lang/Exception;
    :catch_46
    move-exception v0

    .line 234
    .local v0, "e":Ljava/lang/Throwable;
    :goto_47
    const/4 v2, 0x0

    goto :goto_3

    .end local v0    # "e":Ljava/lang/Throwable;
    :catchall_49
    move-exception v4

    :goto_4a
    const/4 v2, 0x0

    throw v4

    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v1    # "file":Ljava/io/File;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catchall_4c
    move-exception v4

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_4a

    .line 231
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_4f
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_47

    .line 229
    .end local v2    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v3    # "fileOutputStream":Ljava/io/OutputStream;
    :catch_52
    move-exception v0

    move-object v2, v3

    .end local v3    # "fileOutputStream":Ljava/io/OutputStream;
    .restart local v2    # "fileOutputStream":Ljava/io/OutputStream;
    goto :goto_44
.end method

.method public static unGzip(Lorg/apache/http/HttpEntity;)Ljava/lang/String;
    .registers 7
    .param p0, "compressedEntity"    # Lorg/apache/http/HttpEntity;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 55
    if-nez p0, :cond_5

    .line 56
    const-string v3, ""

    .line 73
    :cond_4
    :goto_4
    return-object v3

    .line 57
    :cond_5
    invoke-interface {p0}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v0

    .line 58
    .local v0, "compressed":Ljava/io/InputStream;
    new-instance v2, Ljava/util/zip/GZIPInputStream;

    invoke-direct {v2, v0}, Ljava/util/zip/GZIPInputStream;-><init>(Ljava/io/InputStream;)V

    .line 59
    .local v2, "rawData":Ljava/io/InputStream;
    invoke-static {v2}, Lcom/zuiapps/library/util/UpgradeIOUtil;->convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;

    move-result-object v3

    .line 60
    .local v3, "results":Ljava/lang/String;
    if-eqz v3, :cond_4

    .line 61
    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "{"

    invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_2c

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "}"

    invoke-virtual {v4, v5}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_4

    .line 63
    :cond_2c
    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "["

    invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_44

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    const-string v5, "]"

    invoke-virtual {v4, v5}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_4

    .line 67
    :cond_44
    :try_start_44
    invoke-interface {p0}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/library/util/UpgradeIOUtil;->convertStreamToString(Ljava/io/InputStream;)Ljava/lang/String;
    :try_end_4b
    .catch Ljava/lang/IllegalStateException; {:try_start_44 .. :try_end_4b} :catch_4d

    move-result-object v3

    goto :goto_4

    .line 68
    :catch_4d
    move-exception v1

    .line 69
    .local v1, "e":Ljava/lang/IllegalStateException;
    goto :goto_4
.end method
